package com.hwadee.springboot.service.impl;

import com.hwadee.springboot.entity.R;
import com.hwadee.springboot.mapper.StudentPortraitMapper;
import com.hwadee.springboot.service.StudentPortraitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentPortraitServiceImpl implements StudentPortraitService {

    @Autowired
    private StudentPortraitMapper studentPortraitMapper;

    @Override
    public R getStudentPortraitByID(Long studentid) {
        if(studentid==null){
            return R.error(400).msg("查询失败");
        }
        return R.ok().msg("查询成功").data(studentPortraitMapper.getStudentPortraitByID(studentid));
    }
}
